using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace SmartLink.DTOS.Account
{
    public class LoginDTO
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [Required(ErrorMessage = "用户名不能为空")]
        [RegularExpression(@"^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$|^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$", ErrorMessage = "用户名格式不正确，请输入手机/邮箱。")]
        public string UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "密码不能为空")]
        [StringLength(20, MinimumLength = 8, ErrorMessage = "密码长度不正确")]
        public string PassWord { get; set; }

        /// <summary>
        /// IP
        /// </summary>
        public string Ip { get; set; }

        /// <summary>
        /// 终端型号
        /// </summary>
        public string ClientModel { get; set; }

        /// <summary>
        /// 终端系统版本
        /// </summary>
        public string ClientVersion { get; set; }

        /// <summary>
        /// 当前软件版本
        /// </summary>
        public string SoftVersion { get; set; }

        /// <summary>
        /// 登陆区域
        /// </summary>
        public string LoadingArea { get; set; }
    }
}
